import request from '@/utils/request'
import qs from 'qs'
// 请求地址前缀
const REQUEST_URL_PRE = "/manage/customerPayOrder";

export default {
    /**
     * 分页查询订单记录
     * @param {Object} queryParams 
     */
    fetchList(queryParams){
        return request({
            url: REQUEST_URL_PRE + '/list',
            method: 'get',
            params: queryParams
        })
    },
    /**
     * 发起订单补单请求
     * @param {String} orderNo
     * @param {String} account
     */
    replacementOrder(orderNo, account) {
        let data = { "orderNo": orderNo, "account": account};
        let requestData = qs.stringify(data);
        return request({
            url: REQUEST_URL_PRE + '/replacementOrder',
            method: 'post',
            data: requestData
        })
    },
    /**
     * 根据查询条件统计订单数据
     * @param {Object} queryParams 
     */
    loadStatisticsData(queryParams) {
        return request({
            url: REQUEST_URL_PRE + '/loadStatisticsData',
            method: 'get',
            params: queryParams
        })
    }
}
